package com.zjitc.service.imp;

import com.zjitc.dao.CountryDao;
import com.zjitc.model.Country;
import com.zjitc.service.CountryService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/20 16:13
 * @description:
 */
@Service
public class CountryServiceImp implements CountryService{
  @Autowired
  private CountryDao countryDao;

  @Override
  public List<Country> findAll() {
    return countryDao.findAll();
  }

  @Override
  public List<Country> findByCountryName(String countryName) {
    return countryDao.findByCountryName(countryName);
  }

  @Override
  public int insert(Country country) {
    return countryDao.insert(country);
  }

  @Override
  public int delete(String code) {
      return countryDao.delete(code);
  }

  @Override
  public int update(Country country) {
    return countryDao.update(country);
  }

  @Override
  public Country findByCode(String code) {
    return countryDao.findByCode(code);
  }
}
